/PROG  PNS0027
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "VE21_2330_2331";
PROG_SIZE	= 3443;
CREATE		= DATE 23-09-01  TIME 08:34:50;
MODIFIED	= DATE 25-08-22  TIME 08:44:10;
FILE_NAME	= PNS0041;
VERSION		= 0;
LINE_COUNT	= 122;
MEMORY_SIZE	= 3899;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0041 ;
   7:  !  PART:53338597/8598  ;
   8:  !HL_0714*********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED/SuDu]=10    ;
  24:  OVERRIDE=R[5:SPEED/SuDu] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[6] 50% CNT100 ACC100    ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED/SuDu] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  53:  R[5:SPEED/SuDu]=100    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED/SuDu] ;
  56:J P[3:PICK APPROACH] 100% CNT40 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT10 ACC100 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,0.5sec    ;
  63:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:   ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  68:   ;
  69:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  70:   ;
  71:  LBL[30:GOTO DROP POUNCE] ;
  72:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  73:   ;
  74:   ;
  75:  TIMER[3]=STOP ;
  76:  LBL[40:AT DROP POUNCE] ;
  77:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  78:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  79:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  80:  JMP LBL[40] ;
  81:   ;
  82:  LBL[50:MOVE DROP SNEAK] ;
  83:  TIMER[3]=START ;
  84:  OVERRIDE=R[5:SPEED/SuDu] ;
  85:J P[9:DROP SNEAK] 100% CNT50 ACC100    ;
  86:  LBL[51:DROP OR C-P-S] ;
  87:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  88:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  89:  JMP LBL[51] ;
  90:  JMP LBL[50] ;
  91:   ;
  92:  LBL[60:MOVE CLS-PRS-ACC] ;
  93:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  94:  PAUSE ;
  95:  JMP LBL[30] ;
  96:   ;
  97:  LBL[80:DROP ENABLED] ;
  98:  TIMER[3]=START ;
  99:  !PROCEED TO DROP ;
 100:  OVERRIDE=R[5:SPEED/SuDu] ;
 101:J P[10:DROP APPROACH] 100% CNT20 ACC100    ;
 102:  MONITOR END Z_CHECH ;
 103:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 104:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 105:  PAYLOAD[3] ;
 106:  CALL CHK_DROP    ;
 107:   ;
 108:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 109:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 110:  !GOTO PICK POUNCE ;
 111:J P[2:PICK POUNCE] 100% CNT100 ACC110 BREAK    ;
 112:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 113:  JMP LBL[10] ;
 114:   ;
 115:  LBL[90:END OF CYCLE] ;
 116:  TIMER[1]=STOP ;
 117:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 118:  MONITOR END MON_PICK ;
 119:J P[1:MIDDLE] 50% CNT100    ;
 120:  MOVE TO HOME    ;
 121:   ;
 122:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1253.422  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2236.068  mm,	Y =  1549.475  mm,	Z = -1026.572  mm,
	W =   179.881 deg,	P =      .729 deg,	R =   109.967 deg,
	E1=   167.986 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2565.321  mm,	Y =  3226.021  mm,	Z = -1096.177  mm,
	W =  -179.813 deg,	P =    -1.522 deg,	R =    89.194 deg,
	E1=   106.169 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2565.322  mm,	Y =  3226.021  mm,	Z = -1214.976  mm,
	W =  -179.813 deg,	P =    -1.522 deg,	R =    89.194 deg,
	E1=   106.169 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2565.321  mm,	Y =  3226.021  mm,	Z =  -943.058  mm,
	W =  -179.813 deg,	P =    -1.522 deg,	R =    89.194 deg,
	E1=   106.169 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2236.034  mm,	Y =  1298.488  mm,	Z = -1026.658  mm,
	W =   179.884 deg,	P =      .729 deg,	R =   109.966 deg,
	E1=   167.987 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2576.813  mm,	Y =  1461.490  mm,	Z =  -996.316  mm,
	W =   179.956 deg,	P =     -.457 deg,	R =    89.195 deg,
	E1=   106.169 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2084.746  mm,	Y = -1189.492  mm,	Z =  -973.530  mm,
	W =  -178.598 deg,	P =      .227 deg,	R =  -153.778 deg,
	E1=    78.569 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2344.580  mm,	Y = -2058.232  mm,	Z =  -960.611  mm,
	W =  -178.826 deg,	P =    -1.307 deg,	R =   -94.730 deg,
	E1=   112.436 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2734.689  mm,	Y = -3227.032  mm,	Z =  -976.340  mm,
	W =  -177.970 deg,	P =    -1.664 deg,	R =   -89.777 deg,
	E1=   105.041 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2732.392  mm,	Y = -3227.034  mm,	Z = -1180.659  mm,
	W =  -177.970 deg,	P =    -1.664 deg,	R =   -89.777 deg,
	E1=   105.041 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2734.690  mm,	Y = -3227.031  mm,	Z = -1081.060  mm,
	W =  -177.970 deg,	P =    -1.664 deg,	R =   -89.777 deg,
	E1=   105.041 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2581.006  mm,	Y = -1426.776  mm,	Z =  -956.028  mm,
	W =  -179.736 deg,	P =      .020 deg,	R =  -104.350 deg,
	E1=   105.040 deg
};
/END
